####### GL2PS
PROJECT(GL2PS)
ADD_DEFINITIONS("-DGL2PSDLL")
ADD_DEFINITIONS("-DGL2PSDLL_EXPORTS")
ADD_DEFINITIONS("-D_USE_MATH_DEFINES")
ADD_DEFINITIONS("-DGL2PS_HAVE_LIBPNG")
ADD_DEFINITIONS("-DGL2PS_HAVE_ZLIB")
ADD_DEFINITIONS("-D_CRT_SECURE_NO_DEPRECATE")
ADD_DEFINITIONS("-D_CRT_NONSTDC_NO_WARNINGS")

INCLUDE_DIRECTORIES(${LIBPNG_DIR})
INCLUDE_DIRECTORIES(${ZLIB_DIR})

FILE(GLOB png_files ${LIBPNG_DIR}/*.c)
FILE(GLOB zlib_files ${ZLIB_DIR}/*.c)
LIST(REMOVE_ITEM zlib_files "${ZLIB_DIR}/example.c")
LIST(REMOVE_ITEM zlib_files "${ZLIB_DIR}/minigzip.c")
LIST(REMOVE_ITEM zlib_files "${LIBPNG_DIR}/pngtest.c")

LINK_LIBRARIES("opengl32")
ADD_LIBRARY (gl2ps ${BUNDLE_LIB_MODIFIER} ${GL2PS_DIR}/gl2ps.c ${png_files} ${zlib_files})

INSTALL(FILES ${GL2PS_DIR}/gl2ps.h DESTINATION ${OCE_WIN_BUNDLE_INSTALL_DIR}/include/gl2ps)

INSTALL(TARGETS gl2ps
		ARCHIVE DESTINATION  "${OCE_WIN_BUNDLE_INSTALL_DIR_BITS}/lib/" CONFIGURATIONS Debug Release MinSizeRel RelWithDebInfo
		LIBRARY DESTINATION  "${OCE_WIN_BUNDLE_INSTALL_DIR_BITS}/lib/" CONFIGURATIONS Debug Release MinSizeRel RelWithDebInfo
		RUNTIME DESTINATION  "${OCE_WIN_BUNDLE_INSTALL_DIR_BITS}/bin/" CONFIGURATIONS Debug Release MinSizeRel RelWithDebInfo
		)
